package com.example.tutormanagement.mapper;

import com.example.tutormanagement.pojo.Charge;
import com.example.tutormanagement.pojo.Salary;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * &#064;Date: 23/06/15-14:25
 * &#064;Description:
 */
@Mapper
public interface SalaryMapper {
    //连接查询
    @Select("select salary.pid,name,subj,salary from salary,profession_register where salary.pid=profession_register.pid")
    List<Salary> list();

    @Update("update salary set salary=#{salary} where pid=#{pid}")
    void update(Salary salary);

    @Insert("insert into salary(pid,salary) values(#{pid},#{salary})")
    void insert(Salary salary);

    @Select("select salary.pid,name,subj,salary from salary,profession_register where salary.pid=profession_register.pid and salary.pid=#{id}")
    Salary select(String id);

    @Delete("delete from salary where pid=#{id}")
    void delete(String id);
}
